import Vue from 'vue'
import Router from 'vue-router'
import MarkPage from '@/views/mark-page' // 标注界面
import CreateBatch from '@/views/CreateBatch' // 创建批次
import Login from '@/views/login' // login
import Home from '@/views/Home'
import Notfound from '@/views/Notfound' // 404
import MyintegralDetail from '@/views/MyintegralDetail' // 积分详情
import MarktaskDetail from '@/views/MarktaskDetail' // 任务详情
import CreateMedal from '@/views/CreateMedal' // 创建勋章
import ResultPage from '@/views/ResultPage'   // 结果页面
Vue.use(Router)

export default new Router({
    base: '/assets/',
    mode: 'history',
    routes: [{
            path: '/login',
            name: 'Login',
            component: Login
        },
        {
            path: '/home',
            component: Home,
            children: [{
                    path: 'mark-page/*',
                    name: 'mark-page',
                    component: MarkPage,
                    meta: {
                        title: "标注"
                    }
                },
                {
                    path: 'create-batch/*',
                    name: 'create-batch',
                    component: CreateBatch,
                    meta: {
                        title: "创建批次"
                    }
                },
                {
                    path: 'marktask-detail/*',
                    name: 'marktask-detail',
                    component: MarktaskDetail,
                    meta: {
                        title: "标注任务详情"
                    }
                },
                {
                    path: 'myintegral-detail/*',
                    name: 'myintegral-detail',
                    component: MyintegralDetail,
                    meta: {
                        title: "我的积分详情"
                    }
                },
                {
                  path: 'result-page/*',
                  name: 'result-page',
                  component: ResultPage,
                  meta: {
                    title: "查看结果"
                  }
                },
                {
                    path: 'create-medal/*',
                    name: 'create-medal',
                    component: CreateMedal,
                    meta: {
                        title: "创建勋章"
                    }
                },
                // {
                //   path: 'medal-page/*',
                //   name: 'medal-page',
                //   component: MedalPage,
                //   meta: {
                //     title: "勋章标注"
                //   }
                // }
            ]
        },
        {
            path: '*',
            component: Notfound,
            meta: {
                title: '找不到此页面'
            }
        }
    ]
})